//
//  LTAboutController.m
//  LTChat
//
//  Created by 俊松何 on 2017/7/28.
//  Copyright © 2017年 俊松何. All rights reserved.
//

#import "LTAboutController.h"

@interface LTAboutController ()

@end

@implementation LTAboutController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"关于";
}

-(void)yd_addSubviews
{
    UIImageView *imageView = [UIImageView new];
    [self.view addSubview:imageView];
    {
        imageView.image = [UIImage imageNamed:@"appLogo"];
    }
    NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
    // app名称
    NSString *app_Name = [infoDictionary objectForKey:@"CFBundleDisplayName"];
    // app版本
    NSString *app_Version = [infoDictionary objectForKey:@"CFBundleShortVersionString"];
    
    UILabel *nameLable = [UILabel new];
    nameLable.textColor =[UIColor blackColor];
    nameLable.font = [UIFont systemFontOfSize:18];
    nameLable.text = app_Name;
    
    UILabel *versaionLable =  [UILabel new];
    versaionLable.textColor = [UIColor blackColor];
//  versaionLable.text = @"1.0.0";
    versaionLable.text = app_Version;
    
    versaionLable.font = [UIFont systemFontOfSize:15];
    
    [self.view addSubview:nameLable];
    [self.view addSubview:versaionLable];
    
    
    imageView.layer.masksToBounds = YES;
    imageView.layer.cornerRadius = 40;
    
    [imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.mas_equalTo(80);
        make.height.mas_equalTo(80);
        make.centerX.mas_equalTo(self.view.centerX).offset(0);
        make.top.mas_equalTo(self.view.mas_top).offset(120);
    }];
    
    [nameLable mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(self.view.centerX).offset(0);
        make.top.mas_equalTo(imageView.mas_bottom).offset(10);
    }];
    
    [versaionLable mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(self.view.centerX).offset(0);
        make.top.mas_equalTo(nameLable.mas_bottom).offset(10);
    }];

}



@end
